﻿using System;
using System.Collections.Generic;
using System.Text;

namespace RaisingStudio.Data.SharePoint.Entities
{
    public partial class _Tasks : RaisingStudio.Data.Expressions.TableExpression, RaisingStudio.Data.Expressions.IQueryExpression<_Tasks>
    {
        #region Constructor (s) / Destructor
        /// <summary>
        /// Constructor (s) / Destructor.
        /// </summary>
        public _Tasks() : base("Tasks")
        {
        }
        #endregion
        #region Members
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ContentTypeId = "ContentTypeId";
        public RaisingStudio.Data.Expressions.ColumnExpression ContentTypeId { get { return _ContentTypeId; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Title = "Title";
        public RaisingStudio.Data.Expressions.ColumnExpression Title { get { return _Title; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __ModerationComments = "_ModerationComments";
        public RaisingStudio.Data.Expressions.ColumnExpression _ModerationComments { get { return __ModerationComments; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _File_x0020_Type = "File_x0020_Type";
        public RaisingStudio.Data.Expressions.ColumnExpression File_x0020_Type { get { return _File_x0020_Type; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Priority = "Priority";
        public RaisingStudio.Data.Expressions.ColumnExpression Priority { get { return _Priority; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Status = "Status";
        public RaisingStudio.Data.Expressions.ColumnExpression Status { get { return _Status; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _PercentComplete = "PercentComplete";
        public RaisingStudio.Data.Expressions.ColumnExpression PercentComplete { get { return _PercentComplete; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _AssignedTo = "AssignedTo";
        public RaisingStudio.Data.Expressions.ColumnExpression AssignedTo { get { return _AssignedTo; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _TaskGroup = "TaskGroup";
        public RaisingStudio.Data.Expressions.ColumnExpression TaskGroup { get { return _TaskGroup; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Body = "Body";
        public RaisingStudio.Data.Expressions.ColumnExpression Body { get { return _Body; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _StartDate = "StartDate";
        public RaisingStudio.Data.Expressions.ColumnExpression StartDate { get { return _StartDate; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _DueDate = "DueDate";
        public RaisingStudio.Data.Expressions.ColumnExpression DueDate { get { return _DueDate; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _WorkflowLink = "WorkflowLink";
        public RaisingStudio.Data.Expressions.ColumnExpression WorkflowLink { get { return _WorkflowLink; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _OffsiteParticipant = "OffsiteParticipant";
        public RaisingStudio.Data.Expressions.ColumnExpression OffsiteParticipant { get { return _OffsiteParticipant; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _OffsiteParticipantReason = "OffsiteParticipantReason";
        public RaisingStudio.Data.Expressions.ColumnExpression OffsiteParticipantReason { get { return _OffsiteParticipantReason; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _WorkflowOutcome = "WorkflowOutcome";
        public RaisingStudio.Data.Expressions.ColumnExpression WorkflowOutcome { get { return _WorkflowOutcome; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _WorkflowName = "WorkflowName";
        public RaisingStudio.Data.Expressions.ColumnExpression WorkflowName { get { return _WorkflowName; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _TaskType = "TaskType";
        public RaisingStudio.Data.Expressions.ColumnExpression TaskType { get { return _TaskType; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _FormURN = "FormURN";
        public RaisingStudio.Data.Expressions.ColumnExpression FormURN { get { return _FormURN; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _FormData = "FormData";
        public RaisingStudio.Data.Expressions.ColumnExpression FormData { get { return _FormData; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _EmailBody = "EmailBody";
        public RaisingStudio.Data.Expressions.ColumnExpression EmailBody { get { return _EmailBody; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _HasCustomEmailBody = "HasCustomEmailBody";
        public RaisingStudio.Data.Expressions.ColumnExpression HasCustomEmailBody { get { return _HasCustomEmailBody; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _SendEmailNotification = "SendEmailNotification";
        public RaisingStudio.Data.Expressions.ColumnExpression SendEmailNotification { get { return _SendEmailNotification; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _PendingModTime = "PendingModTime";
        public RaisingStudio.Data.Expressions.ColumnExpression PendingModTime { get { return _PendingModTime; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Completed = "Completed";
        public RaisingStudio.Data.Expressions.ColumnExpression Completed { get { return _Completed; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _WorkflowListId = "WorkflowListId";
        public RaisingStudio.Data.Expressions.ColumnExpression WorkflowListId { get { return _WorkflowListId; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _WorkflowItemId = "WorkflowItemId";
        public RaisingStudio.Data.Expressions.ColumnExpression WorkflowItemId { get { return _WorkflowItemId; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ExtendedProperties = "ExtendedProperties";
        public RaisingStudio.Data.Expressions.ColumnExpression ExtendedProperties { get { return _ExtendedProperties; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ContentType = "ContentType";
        public RaisingStudio.Data.Expressions.ColumnExpression ContentType { get { return _ContentType; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ID = "ID";
        public RaisingStudio.Data.Expressions.ColumnExpression ID { get { return _ID; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Modified = "Modified";
        public RaisingStudio.Data.Expressions.ColumnExpression Modified { get { return _Modified; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Created = "Created";
        public RaisingStudio.Data.Expressions.ColumnExpression Created { get { return _Created; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Author = "Author";
        public RaisingStudio.Data.Expressions.ColumnExpression Author { get { return _Author; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Editor = "Editor";
        public RaisingStudio.Data.Expressions.ColumnExpression Editor { get { return _Editor; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __HasCopyDestinations = "_HasCopyDestinations";
        public RaisingStudio.Data.Expressions.ColumnExpression _HasCopyDestinations { get { return __HasCopyDestinations; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __CopySource = "_CopySource";
        public RaisingStudio.Data.Expressions.ColumnExpression _CopySource { get { return __CopySource; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _owshiddenversion = "owshiddenversion";
        public RaisingStudio.Data.Expressions.ColumnExpression owshiddenversion { get { return _owshiddenversion; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _WorkflowVersion = "WorkflowVersion";
        public RaisingStudio.Data.Expressions.ColumnExpression WorkflowVersion { get { return _WorkflowVersion; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __UIVersion = "_UIVersion";
        public RaisingStudio.Data.Expressions.ColumnExpression _UIVersion { get { return __UIVersion; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __UIVersionString = "_UIVersionString";
        public RaisingStudio.Data.Expressions.ColumnExpression _UIVersionString { get { return __UIVersionString; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Attachments = "Attachments";
        public RaisingStudio.Data.Expressions.ColumnExpression Attachments { get { return _Attachments; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __ModerationStatus = "_ModerationStatus";
        public RaisingStudio.Data.Expressions.ColumnExpression _ModerationStatus { get { return __ModerationStatus; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Edit = "Edit";
        public RaisingStudio.Data.Expressions.ColumnExpression Edit { get { return _Edit; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _LinkTitleNoMenu = "LinkTitleNoMenu";
        public RaisingStudio.Data.Expressions.ColumnExpression LinkTitleNoMenu { get { return _LinkTitleNoMenu; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _LinkTitle = "LinkTitle";
        public RaisingStudio.Data.Expressions.ColumnExpression LinkTitle { get { return _LinkTitle; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _SelectTitle = "SelectTitle";
        public RaisingStudio.Data.Expressions.ColumnExpression SelectTitle { get { return _SelectTitle; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _InstanceID = "InstanceID";
        public RaisingStudio.Data.Expressions.ColumnExpression InstanceID { get { return _InstanceID; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Order = "Order";
        public RaisingStudio.Data.Expressions.ColumnExpression Order { get { return _Order; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _GUID = "GUID";
        public RaisingStudio.Data.Expressions.ColumnExpression GUID { get { return _GUID; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _WorkflowInstanceID = "WorkflowInstanceID";
        public RaisingStudio.Data.Expressions.ColumnExpression WorkflowInstanceID { get { return _WorkflowInstanceID; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _FileRef = "FileRef";
        public RaisingStudio.Data.Expressions.ColumnExpression FileRef { get { return _FileRef; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _FileDirRef = "FileDirRef";
        public RaisingStudio.Data.Expressions.ColumnExpression FileDirRef { get { return _FileDirRef; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Last_x0020_Modified = "Last_x0020_Modified";
        public RaisingStudio.Data.Expressions.ColumnExpression Last_x0020_Modified { get { return _Last_x0020_Modified; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Created_x0020_Date = "Created_x0020_Date";
        public RaisingStudio.Data.Expressions.ColumnExpression Created_x0020_Date { get { return _Created_x0020_Date; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _FSObjType = "FSObjType";
        public RaisingStudio.Data.Expressions.ColumnExpression FSObjType { get { return _FSObjType; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _PermMask = "PermMask";
        public RaisingStudio.Data.Expressions.ColumnExpression PermMask { get { return _PermMask; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _FileLeafRef = "FileLeafRef";
        public RaisingStudio.Data.Expressions.ColumnExpression FileLeafRef { get { return _FileLeafRef; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _UniqueId = "UniqueId";
        public RaisingStudio.Data.Expressions.ColumnExpression UniqueId { get { return _UniqueId; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ProgId = "ProgId";
        public RaisingStudio.Data.Expressions.ColumnExpression ProgId { get { return _ProgId; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ScopeId = "ScopeId";
        public RaisingStudio.Data.Expressions.ColumnExpression ScopeId { get { return _ScopeId; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _HTML_x0020_File_x0020_Type = "HTML_x0020_File_x0020_Type";
        public RaisingStudio.Data.Expressions.ColumnExpression HTML_x0020_File_x0020_Type { get { return _HTML_x0020_File_x0020_Type; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __EditMenuTableStart = "_EditMenuTableStart";
        public RaisingStudio.Data.Expressions.ColumnExpression _EditMenuTableStart { get { return __EditMenuTableStart; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __EditMenuTableEnd = "_EditMenuTableEnd";
        public RaisingStudio.Data.Expressions.ColumnExpression _EditMenuTableEnd { get { return __EditMenuTableEnd; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _LinkFilenameNoMenu = "LinkFilenameNoMenu";
        public RaisingStudio.Data.Expressions.ColumnExpression LinkFilenameNoMenu { get { return _LinkFilenameNoMenu; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _LinkFilename = "LinkFilename";
        public RaisingStudio.Data.Expressions.ColumnExpression LinkFilename { get { return _LinkFilename; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _DocIcon = "DocIcon";
        public RaisingStudio.Data.Expressions.ColumnExpression DocIcon { get { return _DocIcon; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ServerUrl = "ServerUrl";
        public RaisingStudio.Data.Expressions.ColumnExpression ServerUrl { get { return _ServerUrl; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _EncodedAbsUrl = "EncodedAbsUrl";
        public RaisingStudio.Data.Expressions.ColumnExpression EncodedAbsUrl { get { return _EncodedAbsUrl; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _BaseName = "BaseName";
        public RaisingStudio.Data.Expressions.ColumnExpression BaseName { get { return _BaseName; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _MetaInfo = "MetaInfo";
        public RaisingStudio.Data.Expressions.ColumnExpression MetaInfo { get { return _MetaInfo; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __Level = "_Level";
        public RaisingStudio.Data.Expressions.ColumnExpression _Level { get { return __Level; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression __IsCurrentVersion = "_IsCurrentVersion";
        public RaisingStudio.Data.Expressions.ColumnExpression _IsCurrentVersion { get { return __IsCurrentVersion; } }

		#endregion

        public static implicit operator RaisingStudio.Data.Expressions.ConditionExpression(_Tasks Tasks)
        {
            return new RaisingStudio.Data.Expressions.ConditionExpression();
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression)
        {
             RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
             return conditionExpression.OrderBy(columnExpression);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression, RaisingStudio.Data.Expressions.SortingDirection sortingDirection)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.OrderBy(columnExpression, sortingDirection);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression Where(RaisingStudio.Data.Expressions.ExpressionElement expressionElement)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.Where(expressionElement);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpressionCollection(_Tasks Tasks)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpressionCollection(Tasks);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpression[](_Tasks Tasks)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpression[]
                        {                            
                            Tasks.ContentTypeId,
                            Tasks.Title,
                            Tasks._ModerationComments,
                            Tasks.File_x0020_Type,
                            Tasks.Priority,
                            Tasks.Status,
                            Tasks.PercentComplete,
                            Tasks.AssignedTo,
                            Tasks.TaskGroup,
                            Tasks.Body,
                            Tasks.StartDate,
                            Tasks.DueDate,
                            Tasks.WorkflowLink,
                            Tasks.OffsiteParticipant,
                            Tasks.OffsiteParticipantReason,
                            Tasks.WorkflowOutcome,
                            Tasks.WorkflowName,
                            Tasks.TaskType,
                            Tasks.FormURN,
                            Tasks.FormData,
                            Tasks.EmailBody,
                            Tasks.HasCustomEmailBody,
                            Tasks.SendEmailNotification,
                            Tasks.PendingModTime,
                            Tasks.Completed,
                            Tasks.WorkflowListId,
                            Tasks.WorkflowItemId,
                            Tasks.ExtendedProperties,
                            Tasks.ContentType,
                            Tasks.ID,
                            Tasks.Modified,
                            Tasks.Created,
                            Tasks.Author,
                            Tasks.Editor,
                            Tasks._HasCopyDestinations,
                            Tasks._CopySource,
                            Tasks.owshiddenversion,
                            Tasks.WorkflowVersion,
                            Tasks._UIVersion,
                            Tasks._UIVersionString,
                            Tasks.Attachments,
                            Tasks._ModerationStatus,
                            Tasks.Edit,
                            Tasks.LinkTitleNoMenu,
                            Tasks.LinkTitle,
                            Tasks.SelectTitle,
                            Tasks.InstanceID,
                            Tasks.Order,
                            Tasks.GUID,
                            Tasks.WorkflowInstanceID,
                            Tasks.FileRef,
                            Tasks.FileDirRef,
                            Tasks.Last_x0020_Modified,
                            Tasks.Created_x0020_Date,
                            Tasks.FSObjType,
                            Tasks.PermMask,
                            Tasks.FileLeafRef,
                            Tasks.UniqueId,
                            Tasks.ProgId,
                            Tasks.ScopeId,
                            Tasks.HTML_x0020_File_x0020_Type,
                            Tasks._EditMenuTableStart,
                            Tasks._EditMenuTableEnd,
                            Tasks.LinkFilenameNoMenu,
                            Tasks.LinkFilename,
                            Tasks.DocIcon,
                            Tasks.ServerUrl,
                            Tasks.EncodedAbsUrl,
                            Tasks.BaseName,
                            Tasks.MetaInfo,
                            Tasks._Level,
                            Tasks._IsCurrentVersion,
                        };
        }

        public RaisingStudio.Data.Expressions.ColumnExpressionCollection Except(params RaisingStudio.Data.Expressions.ColumnExpression[] columns)
        {
            RaisingStudio.Data.Expressions.ColumnExpressionCollection columnExpressionCollection = this;
            return columnExpressionCollection.Except(columns);
        }

    
        public static implicit operator RaisingStudio.Data.Expressions.QueryExpression<_Tasks>(_Tasks Tasks)
        {
            return new RaisingStudio.Data.Expressions.QueryExpression<_Tasks>(Tasks);
        }


        #region IQueryExpression<_Tasks> 成员

        _Tasks RaisingStudio.Data.Expressions.IQueryExpression<_Tasks>.Value
        {
            get { return Tasks._; }
        }

        #endregion

        #region IQueryExpression 成员

        RaisingStudio.Data.Expressions.TableExpression RaisingStudio.Data.Expressions.IQueryExpression.Table
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ConditionExpression RaisingStudio.Data.Expressions.IQueryExpression.Condition
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ColumnExpressionCollection RaisingStudio.Data.Expressions.IQueryExpression.Columns
        {
            get { return null; }
        }

        #endregion
    }

    partial class Tasks
    {
        #region Members
        public static readonly _Tasks _ = new _Tasks();
		#endregion
    }
}
